Repository navigation
Conversation
Hosts pass the stack's pointer, the signed descriptor their build bundles, and whether the build allows Polkadot's reserved values, instead of genesis hashes, a network suffix and a supportedChains callback. - truapi: Stack::bundled verifies the bundled copy against the pointer's key and refuses a pointer without one, a descriptor without People or Bulletin, a TLD the core does not serve, and Polkadot's genesis hashes or `dot` unless the build allows them. Stack::new builds one from parts for Rust hosts under the same rules. - get_chain_info, the People, Bulletin and Asset Hub chains and the signing role's TLD come from the stack. Features::supported_chains, HostChainSet and HostChainEntry are gone. - Native: HostRuntimeConfig.stack (BundledStack). Browser: runtimeConfig.stack, and runtimeConfig.testStack in the test-host bundle. - CLI: builds its stack from the network it resolved; only Polkadot may use reserved values. - iOS and Android apps bundle the previewnet, paseo-next-v2 and Polkadot descriptors and pick one per build. Closes #1881
Contributor
|
This pull request touches an app, which is not built by default. Add a label for each build you want:
Each starts as soon as it is added and follows the branch from then on. |
Contributor
Bundle size reportCompared with
WebAssembly modules
Changed files (4)
Commit: e47815c |
Contributor
|
CI Status: 24 required jobs green, 21 passed and 3 skipped by path filter. All job results
Signing credentials: valid as of 2026-11-06 Commit |
The CLI answers get_chain_info with the stack descriptor's network, as an app bundling the same copy does, and keeps its id only as the product namespace. It grants Polkadot's reserved values to the network whose identities are real instead of matching an id a descriptor controls. Session identity lookup takes the stack's Asset Hub as an Option, so the all-zero genesis no longer stands for "none". The signing role's test runtime has no Asset Hub, and the PGAS test that waits on Asset Hub configures one. startTestHost and createMockClient take Partial<MockRuntimeConfig>, so a suite can pass the testStack they read. StackError derives only what is used.
…uilds The production wasm bundle reads its stack from a signed descriptor, so the 32-byte hex helpers serve only runtimeConfig.testStack and were dead code, which -D warnings rejects.
This was referenced Nov 6, 2026
Contributor
Author
|
Split into a stack for review, rebased on main and on #1944's CLI:
Each PR's description says how the stack lands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The core reads its chain configuration from the Trinity stack the host runs. A host passes three things: the stack's pointer, the signed descriptor its build bundles, and whether the build allows Polkadot's reserved values (its genesis hashes and the
dotTLD).Stack::bundledchecks the descriptor against the pointer's key and resolves the network, the TLD, and the Relay, Asset Hub, People and Bulletin genesis hashes.get_chain_inforeturns the same shape as before with values from the descriptor, and the signing role derives identities under the descriptor's TLD.The core refuses a stack when:
Expiry is not checked, because nothing fetches a newer copy yet. Refresh is a separate sub-issue of #1312.
Host API
This is a breaking change for every host.
HostRuntimeConfig.stack: BundledStack { pointer, descriptor, allowsReservedValues }holds the chain configuration.HostBridgehas nosupportedChainscallback.@parity/truapi-host):ProductRuntimeConfig.stack: { pointer, descriptor, allowsReservedValues? }. The test host builds a stack from its parts throughruntimeConfig.testStack, which only thewasm/testingbundle reads.MockHostConfig.servedChainslists the genesis hashesfeatureSupportedanswers from. Themajorchangeset describes the full surface.What each app build bundles
The bundled descriptors are byte-identical copies of the CLI's
stacks/files. iOS reports the network its descriptor declares, so a Release build reportspolkadotand a previewnet build reportspaseo.For reviewers
"network": "paseo", so products on previewnet seepaseo. dotli reportspreviewnettoday.stackto@parity/truapi-host/web.network.rsandmain.rs. Whichever lands second resolves a small conflict. Both carry the same Polkadot descriptor bytes.Testing
truapilib and integration tests pass, and so do thetruapi-host-cliintegration tests. Onetruapi-host-cliunit test fails on macOS only, from a/private/varvs/vartemp path mismatch outside this change.make fmt-checkis clean.RUSTDOCFLAGS="-D warnings" cargo docis clean for the default features,mock,test-hostand--no-default-features.@parity/truapi-hostbun tests pass against freshly built wasm bundles, exceptwasm-bundle.test.ts. That test readsnpm pack --jsonas an array, which npm 12 no longer prints. The@parity/truapitests all pass.TrUAPIHostSwift package and its tests typecheck against regenerated bindings. The iOS app has not been built locally.android-bindingsand Android app jobs are its first compile.Closes #1881